package Olivia.olivia3d.model.ms3d
{
	public class MsJoint
	{
//		typedef struct // 16 bytes
//		{
//			float           time;                               // time in seconds
//			float           rotation[3];                        // x, y, z angles
//		} ms3d_keyframe_rot_t;
//		
//		typedef struct // 16 bytes
//		{
//			float           time;                               // time in seconds
//			float           position[3];                        // local position
//		} ms3d_keyframe_pos_t;
//		
//		typedef struct
//		{
//			byte            flags;                              // SELECTED | DIRTY
//			char            name[32];                           //
//			char            parentName[32];                     //
//			float           rotation[3];                        // local reference matrix
//			float           position[3];
//			
//			word            numKeyFramesRot;                    //
//			word            numKeyFramesTrans;                  //
//			
//			ms3d_keyframe_rot_t keyFramesRot[numKeyFramesRot];      // local animation matrices
//			ms3d_keyframe_pos_t keyFramesTrans[numKeyFramesTrans];  // local animation matrices
//		} ms3d_joint_t;
		public var flags:int;
		public var name:String;
		public static const name_length:int = 32;
		public var parentName:String;
		public static const parentName_length:int = 32;
		public var rotation:Array;
		public var position:Array;
		public var numKeyFramesRot:int;
		public var numKeyFramesTrans:int;
		public var KeyFramesRots:Array;							//[time,1,2,3]
		public var KeyFramesTrans:Array;						//[time,1,2,3]
		
		public function MsJoint(tf:int, tn:String, tpn:String, tr:Array, tp:Array, tnkrot:int, tnktran:int, trots:Array, ttrans:Array)
		{
			flags = tf;
			name = tn;
			parentName = tpn;
			rotation = tr;
			position = tp;
			numKeyFramesRot = tnkrot;
			numKeyFramesTrans = tnktran;
			KeyFramesRots = trots;
			KeyFramesTrans = ttrans;
		}
	}
}